I have the need to create a column that would be set yes/no for an object based on finding a history record for any of 3 different users. Being a novice I went searching for an example of where a value was set based on reading object history. I found a forum entry from last year that showed code for displaying who deleted some objects and when. Here's that code:
HIstory h HistoryType ht
do
if ( ht == deleteObject) I figured if this worked i could figure out how to change it to my need. I went about trying it by adding a new column and selecting "Layout DXL" where I then typed in the above code. A check of the code returned syntax errors beginning with line 1. So my first question, what am I doing wrong? My second question, am I doing the right thing in adding a "Layout DXL" column versus creating an attribute DXL? I'm having a hard time understanding the difference from what I've read in the help documentation. Thanks! Doug_Wilson - Fri Aug 23 18:00:14 EDT 2013 |
Re: Add a column with value set based on history The problem with the code is the line breaks are screwed up. That happened to all the code on the forum prior to IBMs forum 'upgrade'. There are also some undeclared variables.
Also there was a capital 'i' in 'HIstory' -Adam |
Re: Add a column with value set based on history Adamarla - Mon Aug 26 02:27:28 EDT 2013 The problem with the code is the line breaks are screwed up. That happened to all the code on the forum prior to IBMs forum 'upgrade'. There are also some undeclared variables.
Also there was a capital 'i' in 'HIstory' -Adam Adam, thank you! Your code did the trick. Now on to figuring out the modifications I need. Best regards |
Re: Add a column with value set based on history Doug_Wilson - Mon Aug 26 13:16:23 EDT 2013 Adam, thank you! Your code did the trick. Now on to figuring out the modifications I need. Best regards Looks like something like this:
Be advised that the History loop is reset when the module is baselined. If you need to reach into Baselines then it gets stickier. -Louie |
Re: Add a column with value set based on history llandale - Mon Aug 26 15:01:37 EDT 2013 Looks like something like this:
Be advised that the History loop is reset when the module is baselined. If you need to reach into Baselines then it gets stickier. -Louie Louie, thanks for the code suggestion. I ended up using an array for the usernames in case the list grew. -Doug |